<template>
    <div>
      <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>赛事管理</el-breadcrumb-item>
      <el-breadcrumb-item>成绩管理</el-breadcrumb-item>
    </el-breadcrumb>
      <el-table
    :data="tableData"
    style="width: 100%"
    :row-class-name="tableRowClassName">
    <el-table-column
      prop="date"
      label="日期"
      width="180">
    </el-table-column>
    <el-table-column
      prop="name"
      label="比赛名称"
      width="180">
    </el-table-column>
    <el-table-column
      prop="address"
      label="地址">
    </el-table-column>
    <el-table-column label="操作">
        <template >
              <el-button>扫码打分</el-button>
            
             
            <el-button >批量打分</el-button>
            
               </template>

    </el-table-column>
  </el-table>
    </div>
</template>
<script>
  export default {
    methods: {
      tableRowClassName({row, rowIndex}) {
        if (rowIndex === 1) {
          return 'warning-row';
        } else if (rowIndex === 2) {
          return 'success-row';
        }
        return '';
      }
    },
    data() {
      return {
        tableData: [{
          date: '2016-05-02',
          name: '飞向北京职业挑战赛',
          address: '郑州市上街区航校',
        },  {
          date: '2016-05-03',
          name: '全国锦标赛',
          address: '郑州市上街区航校'
        }]
      }
    },
    methods:{
printScoreByQR(){
    this.$router.push('/printScorebyQR')
},
printScoreByCom(){
    this.$router.push('/printScoreByCom')
}
    }
  }
</script>
<style lang="less" scoped>
.el-table .warning-row {
    background: oldlace;
  }

  .el-table .success-row {
    background: #f0f9eb;
  }
</style>